<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent {
            position: relative;
            width: 100px;
            height: 100px;
            border: 1px solid red;
            margin: 50px auto;
            text-align: center;
            line-height: 100px;
        }

        .child {
            position: absolute;
            right: -15px;
            top: -15px;
            width: 30px;
            height: 30px;
            background: green;
            /* border-radius: 15px; */
            border-radius: 50%;
            text-align: center;
            line-height: 30px;
            color: #fff;
        }
    </style>
</head>
<body>
    <div class="parent">
        微信
        <div class="child">2</div>
    </div>
    &gt;&lt;
</body>
</html>